﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ProductDetail.ascx.cs" Inherits="usercontrol_ProductDetail" %>
<%@ Register Assembly="DevExpress.Web.v9.1, Version=9.1.3.0, Culture=neutral, PublicKeyToken=5377c8e3b72b4073"
    Namespace="DevExpress.Web.ASPxSiteMapControl" TagPrefix="dxsm" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.1, Version=9.1.3.0, Culture=neutral, PublicKeyToken=5377c8e3b72b4073"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>

<div class="menu">
	<div class="hc1 hc1-header">
		<div class="hc1-adverb">
			 <asp:Image ID="Image9" runat="server" ImageUrl="~/images/support.png" />
		</div>
		<div class="hc1-text">
			<asp:Label ID="Label5" runat="server" CssClass="text_header" Text="Thông tin chi tiết sản phẩm"></asp:Label>
		</div>
		<div>
			<asp:FormView ID="FVProductDetail" runat="server" DataSourceID="SqlDSProductByID"
                Width="100%">
                <ItemTemplate>
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td align="center" colspan="1" valign="top">
                                    <a href="#" onmouseover="Tip(<img src='<%#Eval("BigImageURL").ToString()%>)" onmouseout="UnTip()">
                                            <asp:Image ID="Image1" runat="server" Height="203px"
                                            ImageUrl='<%# Eval("SmallImageURL").ToString()%>'
                                            Width="195px" AlternateText="ProductImage" />
                                     </a>      </td>
                            <td align="center" colspan="2" valign="top">
                                <table border="0" cellpadding="1" cellspacing="0" width="100%">
                                    <tr>
                                        <td colspan="2">
                                            <asp:Label ID="lblTenSanPham" runat="server" Text='<%# Eval("ProductName") %>' CssClass="text_header"></asp:Label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="1" align="right">
                                            <asp:Label ID="Label3" runat="server" Text="Mã sản phẩm:" Width="93px"></asp:Label></td>
                                        <td valign="top" align="left">
                                            <asp:Label ID="lblMaSanPham" runat="server" Text='<%# Eval("ProductID") %>'></asp:Label></td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                <asp:Label ID="Label1" runat="server" Text="Giá:"></asp:Label></td>
                                        <td align="left">
                                <asp:Label ID="lblGia" runat="server" 
                                                Text='<%# Eval("SalePrice", "{0:0,0}") + " VNĐ" %>' Font-Bold="False" 
                                                Visible='<%# Eval("VisablePrice") %>' CssClass="Price"></asp:Label>
                                            </td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                            <asp:Label ID="Label2" runat="server" Text="Loại"></asp:Label></td>
                                        <td align="left">
                                            <asp:Label ID="lblLoaiSanPham" runat="server" Text='<%# Eval("CategoryID") %>'></asp:Label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/addtocart2.gif" OnClick="ImageButton1_Click" /></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <dxe:ASPxCheckBox ID="ASPxChkbSendMail" runat="server" AutoPostBack="True" Text="Gửi mail đến bạn bè"
                                                ToolTip="Gửi mail đến bạn bè">
                                            </dxe:ASPxCheckBox>
                                        </td>
                                    </tr>
                                </table>                                          
<%--                                <a href="#" onmouseout="UnTip()" onmouseover="Tip('<img src=\'<%#"photos/"+ DataBinder.Eval(Container.DataItem,"ProductID").ToString() + ".jpg" %> \'')">
                                    &nbsp;</a><br />--%>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <asp:Panel ID="PanelSendMail" runat="server" Visible="False" Width="100%">
                                    <table border="0" cellpadding="1" cellspacing="0" class="tableData" width="100%">
                                        <tr>
                                            <td align="center" colspan="2">
                                                <asp:Label ID="Label4" runat="server" CssClass="text_header" Text="Thông Tin Gửi Mail"></asp:Label></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Label ID="Label10" runat="server" Text="Tiêu đề  (*):"></asp:Label></td>
                                            <td>
                                                <asp:TextBox ID="txtTieuDe" runat="server" Width="285px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtTieuDe"
                                                    ErrorMessage="*"></asp:RequiredFieldValidator></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Label ID="Label6" runat="server" Text="Họ tên người gửi (*):" Width="143px"></asp:Label></td>
                                            <td>
                                                <asp:TextBox ID="txtHoTen" runat="server" Width="285px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtHoTen"
                                                    ErrorMessage="*"></asp:RequiredFieldValidator></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Label ID="Label7" runat="server" Text="Email người gửi (*):"></asp:Label></td>
                                            <td>
                                                <asp:TextBox ID="txtEmailGui" runat="server" Width="285px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtEmailGui"
                                                    ErrorMessage="*"></asp:RequiredFieldValidator></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Label ID="Label8" runat="server" Text="Email người nhận (*):"></asp:Label></td>
                                            <td>
                                                <asp:TextBox ID="txtEmailNhan" runat="server" Width="285px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtEmailNhan"
                                                    ErrorMessage="*"></asp:RequiredFieldValidator></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Label ID="Label9" runat="server" Text="Nội dung (*):"></asp:Label></td>
                                            <td valign="middle">
                                                <asp:TextBox ID="txtNoiDung" runat="server" Height="184px" TextMode="MultiLine" Width="287px"></asp:TextBox>
                                                <asp:RequiredFieldValidator
                                                    ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtNoiDung" ErrorMessage="*"></asp:RequiredFieldValidator></td>
                                        </tr>
                                        <tr>
                                            <td align="right" colspan="1" valign="bottom">
                                                <dxe:ASPxButton ID="ASPxbtnSendMail" runat="server" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
                                                    CssPostfix="Aqua" Text="Gửi đi" OnClick="ASPxbtnSendMail_Click" Width="70px">
                                                </dxe:ASPxButton>
                                            </td>
                                            <td align="left" colspan="2" valign="bottom">
                                                <dxe:ASPxButton ID="ASPxbtnReset" runat="server" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
                                                    CssPostfix="Aqua" Text="Viết lại" OnClick="ASPxbtnReset_Click" Width="70px">
                                                </dxe:ASPxButton>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="center" colspan="2">
                                                <asp:Label ID="lblWarning" runat="server" CssClass="Warning" Visible="False"></asp:Label></td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                            </td>
                        </tr>
						<tr>
							<td colspan="3">
								<fieldset>
									<legend>Thông tin sản phẩm</legend>
									<div style="padding: 5px 5px;">
										<asp:Label ID="lblDescriptions" runat="server" Text='<%# Eval("Descriptions") %>'></asp:Label>
									</div>									
								</fieldset>
							</td>
						</tr>
                        <tr>
                            <td>&nbsp;</td>
                            <td align="right">
                            </td>
                            <td>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:FormView>
		</div>
		<div class="fc">
			<div class="hc1-fc"></div>
		</div>
	</div>
</div>
<asp:SqlDataSource ID="SqlDSProductByID" runat="server" ConnectionString="<%$ ConnectionStrings:DaiCuongMobileConnectionString %>"
    
    SelectCommand="SELECT [ProductID], [ProductName], [PrductNameNoSign], [CategoryID], [SupplierID], [Price], [SalePrice], [Quantity], [BigImageURL], [SmallImageURL], [PostDate], [PublishDate], [Descriptions], [VisablePrice] FROM [tbProducts] WHERE ([ProductID] = @ProductID)">
    <SelectParameters>
        <asp:QueryStringParameter Name="ProductID" QueryStringField="pid" 
            Type="Int64" />
    </SelectParameters>
</asp:SqlDataSource>
